<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="com.lmpop.trade.ti_auction_log.*" %>
<%@page import="java.util.*" %>
<%@page import="com.lmpop.frame.util.PageTools" %> 
<%
	request.setCharacterEncoding("UTF-8");
	Hashtable ti_auction_log = new Hashtable();
	
	String auction_id  = "";
	if(request.getParameter("auction_id")!=null && !request.getParameter("auction_id").equals("")){
		auction_id = request.getParameter("auction_id");
		ti_auction_log.put("auction_id",auction_id);
	}
	
	Ti_auction_logInfo ti_auction_logInfo = new Ti_auction_logInfo();
	String iStart = "0";
	int limit = 20;
	if(request.getParameter("iStart")!=null) iStart = request.getParameter("iStart");
	List list = ti_auction_logInfo.getListByPage(ti_auction_log,Integer.parseInt(iStart),limit);
	int counter = ti_auction_logInfo.getCountByObj(ti_auction_log);
	String pageString = new PageTools().getGoogleToolsBar(counter,"auctionLog.jsp?iStart=",Integer.parseInt(iStart),limit);
	%>
<html>
  <head>
    
    <title>竞拍信息查看</title>
	<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="/js/commen.js"></script>
	<script type="text/javascript" src="auction.js"></script>
</head>

<body>
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td width="90%">
				<h1>竞拍信息查看</h1>
			</td>
			
		</tr>
	</table>
	
	<form action="index.jsp" name="indexForm" method="post">

	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="tablehe">
		<tr><td><%=pageString %></td></tr>
	</table>
	
	<% 
		int listsize = 0;
		if(list!=null && list.size()>0){
			listsize = list.size();
	%>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="dl_bg">
		<tr>
			<td width="90%">
			</td>
			<td>
				总计:<%=counter %>条
			</td>
		</tr>
	</table>
	
	<table width="100%" cellpadding="1" cellspacing="1" class="listtab" border="0">
		<tr>
			
		  	<th>活动名称</th>		  	
		  	
		  	<th>竟拍时间</th>
		  			  	
			<th>竟标人</th>
					  			  	
			<th width="10%">竞标价</th>

	  		<th width="10%">是否中标</th>
		</tr>
		
		
		<% 
		  		
				for(int i=0;i<list.size();i++){
		  			Hashtable map = (Hashtable)list.get(i);
       String  user_name="",auction_name="",bid_price="",bid_time="",bid_state="";
	   
	if(map.get("user_name")!=null) user_name = map.get("user_name").toString(); 	
	if(map.get("auction_name")!=null) auction_name = map.get("auction_name").toString();
  	if(map.get("bid_price")!=null) bid_price = map.get("bid_price").toString();	
	if(map.get("bid_time")!=null) {
		bid_time = map.get("bid_time").toString();
		if(bid_time.length()>19) 
		bid_time = bid_time.substring(0,19);
	}
		
	if(map.get("bid_state")!=null) {
		bid_state = map.get("bid_state").toString();
		if(bid_state.equals("0")) {
			bid_state = "未中标";
		}		
		else {
			bid_state = "中标";
		}
	}

		  %>
		
		<tr>
		
		  	<td><%=auction_name%></td>
		  			  	
		  	<td><%=bid_time%></td>
		  	
		  	<td> <%=user_name %></td>
		  	
		  	<td><%=bid_price%></td>
			
			<td><%=bid_state%></td>
		  			  			  		  	
			</tr>
		
		  <%
		  		}
		  %>
		
	</table>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="dl_bg">
		<tr>
			<td width="90%">
				
			</td>
			<td>
				总计:<%=counter %>条
			</td>
		</tr>
	</table>
	<table width="100%" cellpadding="0" cellspacing="0" border="0" class="tablehe">
		<tr><td><%=pageString %></td></tr>
	</table>
	
	
	<%
		 }
	%>

	  <input type="hidden" name="listsize" id="listsize" value="<%=listsize %>" />
	  <input type="hidden" name="pkid" id="pkid" value="" />
	  </form>
	  <table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				<input type="button" class="buttoncss" name="tradeRut" value="返回" onclick="window.history.back()"/>
			</td>
		</tr>
	</table>
</body>

</html>
